# $Id: Makefile,v 1.1.1.1 2005/04/07 22:22:29 jfb Exp $ 
#
# This Makefile takes care of the whole build process for the Maelstrom module
# tree.
#
# Available targets:
#	all	-> Default target, builds everything
#	xs	-> Regenerate all the XS glue for specified headers

CP=cp

PERLDSTDIR=/usr/local/libdata/perl5/site_perl

XSUBPP=xsubpp

H2XS=h2xs
H2XSFLAGS=-O -C -F "-I../../../../../../include/maelstrom"

HDRDIR=../../../../include/maelstrom
H2XSHDRS=event log

XSDIR=Maelstrom


APIPREFIX=mlsapi_




all: xs


xs:
	for hdr in ${H2XSHDRS}; do ( \
		export XSPKG=`perl -e "print ucfirst('$$hdr')"` && \
		echo $$XSPKG && \
		${H2XS} -AOfn ${XSDIR}::$$XSPKG && \
		${CP} ${HDRDIR}/$$hdr.h ${XSDIR}/$$XSPKG && \
		${H2XS} -Oxan ${XSDIR}::$$XSPKG -p ${APIPREFIX} $$hdr.h) \
		done


clean: cleanxs


cleanxs:
